package com.tanhua.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * @author
 * @date 2021/01/21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "recommend_user")
public class RecommendUser implements Serializable {

    /**主键值*/
    @Id
    private ObjectId id;
    /**推荐的用户id*/
    private Long userId;
    /**给谁推荐的*/
    @Indexed
    private Long toUserId;
    /**缘分值*/
    @Indexed
    private Double score;
    /**日期*/
    private Date date;
}